import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'H',
      component: () => import('./views/Home.vue'),
      meta: {
        keepAlive: true // 需要缓存
      }
    },
    {
      path: '/Home',
      name: 'Home',
      component: () => import('./views/Home.vue'),
      meta: {
        keepAlive: true // 需要缓存
      }
    },
    {
      path: '/en',
      name: 'enHome',
      component: () => import('./views/Home.vue'),
      meta: {
        keepAlive: true // 需要缓存
      }
    },
    // {
    //   path: '/Publications',
    //   name: 'Publications',
    //   component: () => import('./views/Publications.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    // {
    //   path: '/Students',
    //   name: 'Students',
    //   component: () => import('./views/Students.vue'),
    //   meta: {
    //     keepAlive: true // 需要缓存
    //   }
    // },
    // {
    //   path: '/Alumnus',
    //   name: 'Alumnus',
    //   component: () => import('./views/Alum.vue'),
    //   meta: {
    //     keepAlive: true // 需要缓存
    //   }
    // },
    // {
    //   path: '/Book',
    //   name: "Book",
    //   component: () => import('./views/diviews/Book.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    {
      path: '/Papers',
      name: "Papers",
      component: () => import('./views/diviews/Papers.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    // {
    //   path: '/Patent',
    //   name: "Patent",
    //   component: () => import('./views/diviews/Patent.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    // {
    //   path: '/Achievement',
    //   name: "Achievement",
    //   component: () => import('./views/diviews/Achievement.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    {
      path: '/Result',
      name: "Result",
      component: () => import('./views/diviews/Result.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    {
      path: '/Academic_work',
      name: "Academic_work",
      component: () => import('./views/diviews/Parttime.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    {
      path: '/DirectionAndProject',
      name: "DirectionAndProject",
      component: () => import('./views/diviews/DirectionAndProject.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    // {
    //   path: '/Direction',
    //   name: "Direction",
    //   component: () => import('./views/diviews/Direction.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    // {
    //   path: '/Project',
    //   name: "Project",
    //   component: () => import('./views/diviews/Project.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    // {
    //   path: '/Course',
    //   name: "Course",
    //   component: () => import('./views/diviews/Course.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    {
      path: '/New',
      name: "New",
      component: () => import('./views/Environment.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    {
      path: '/NewDetail',
      name: "NewDetail",
      component: () => import('./views/diviews/NewDetail.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    // {
    //   path: '/Photos',
    //   name: "Photos",
    //   component: () => import('./views/diviews/photos.vue'),
    //   meta: {
    //     keepAlive: false // 不需要缓存
    //   }
    // },
    {
      path: '/LabCulture',
      name: "LabCulture",
      component: () => import('./views/diviews/LabCulture.vue'),
      meta: {
        keepAlive: false // 不需要缓存
      }
    },
    {
      path: '/*',
      redirect: '/Home'
    },
  ],
});
